import 'package:json_annotation/json_annotation.dart';
import 'package:lazy_food/models/image_model.dart';
import 'package:lazy_food/models/user_model.dart';
part 'follow_model.g.dart';

@JsonSerializable()
class FollowModel {
  List comments;
  bool digged_by_req_user;
  int id;
  ImageModel image;
  List<ImageModel> images;
  String create_time;
  String recipe_name;
  int model_type;
  int n_comments;
  int n_diggs;
  int n_views;
  int recipe_id;
  String text;
  String update_time;
  String url;
  UserModel user;
  int user_id;

  FollowModel(
    this.comments,
    this.digged_by_req_user,
    this.id,
    this.image,
    this.create_time,
    this.images,
    this.recipe_name,
    this.model_type,
    this.n_comments,
    this.n_diggs,
    this.n_views,
    this.recipe_id,
    this.text,
    this.update_time,
    this.url,
    this.user,
    this.user_id,
  );

  factory FollowModel.fromJson(Map<String, dynamic> json) =>
      _$FollowModelFromJson(json);

  Map<String, dynamic> toJson() => _$FollowModelToJson(this);
}
